Retail Agentic Solution

Retail Agentic Solution is a fully agentic business application built entirely on DRUID technology. Powered by DRUID LLM Becus 1.0 with external processing through GPT-4o, this solution delivers a fully conversational, shop-aware retail experience while ensuring privacy and security through integrated PII anonymization.

Customers can:

  • Ask for product recommendations using text or images.
  • Search for products across all shops or filter by a specific shop inventory.
  • Manage their shopping cart, place orders, and initiate returns or claims.
  • Access their account where they can perform various activities such as canceling an order, tracking an order or resending an invoice for an order.
  • Add images to claims, stored securely in Azure Blob Service.
  • Access the Knowledge Base (KB) for FAQs (return policies, delivery, gift packs, MyCollect, etc.).

All sensitive user data is anonymized before reaching external LLM providers, ensuring privacy without compromising conversational capability.

What’s New

  • Version 2.1.0: Added Abandoned Cart functionality to track inactive users with items in their cart and capture potential lost sales. For more information, see Configure Abandoned Cart.

Key Components

This solution includes:

  • CustomCode Orchestrator – Detects and anonymizes PII.
  • Retail-specific agents – Handle browsing and product recommendation, orders, returns, claims, and cart management.
  • Knowledge Base integration – Upload Excel-based KB with FAQs for quick answers.
  • Feature switch (DataAnonymization) – Controls whether anonymization is active.
  • Image product search – Customers can upload images to find related products.
  • Retail database with shop-based stock – Products and stocks are linked to shops; users can filter by shop or view all available products.
  • Claim image upload with Azure Blob Service – Users can attach images to claims, securely stored in Azure.
  • Message-based agents – Each retail agent has its own Messages<AgentName>Agent entity list, ensuring modular conversation history.

Business Workflow

  1. User Interaction – Customers engage with the assistant in natural conversations using text or image-based queries.
  2. Knowledge Base Access – When KB is enabled, general queries (e.g., policies, deliveries, MyCollect) are routed to the knowledge base.
  3. Shop-Aware Inventory – Users can browse across all shops or filter by a specific shop. Orders must be tied to a chosen shop.
  4. Cart & Order Handling – Products are added to a cart tied to the user’s selected shop.
  5. Claims with Images – Users can file claims and optionally upload supporting images. These are stored securely in Azure Blob Service, which integrates into the claim workflow.
  6. Data Anonymization Workflow – If the anonymization feature is enabled, the following steps take place to ensure privacy and reliability:
    • PII Detection – DRUID LLM Becus 1.0 scans user input for sensitive values (names, emails, phone numbers, addresses, IDs). Detected values are replaced with placeholders (e.g., [USER_NAME_1]) in the main LLM context. This guarantees that no sensitive data leaves your tenant.
    • Retry Mechanism – To ensure robustness, every external request is validated before being accepted. The system checks that the LLM returns:
      • Identical arguments
      • Consistent agent names
      • All required values present
      • If mismatches or missing data are found, the request is retried automatically until a valid response is confirmed. This minimizes errors and ensures reliable, consistent handling.
    • Dictionary Storage – Mappings between placeholders and real values are saved in a central dictionary (PiiMappingsJSON).
    • External Processing – Anonymized input is forwarded to GPT-4o (or other configured providers). The external LLMs only process placeholder-based content.
    • De-anonymization – Before showing the response to the user, placeholders are replaced with the original values using the dictionary lookup.
    • Conversation History – Only anonymized content is stored in GPT entities. Users always see fully restored values, while logs remain privacy-safe.

Prerequisites

  • Tenant Druid community (open new tenant here) or Druid subscription.
  • You should have a Druid bot. For information on how to create a bot, see Creating Druid Bots.
  • API resources enabled for DRUID WebView and DRUID Data Service.
  • DRUID LLM API resources activated for Becus 1.0 and GPT-4o. Contact your DRUID sales representative to enable these resources and generate API tokens.
  • Azure subscription credentials for the Blob Storage service to enable image upload in the claim process.

Configuring the Skill Template

To configure the skill template, follow these steps:

Step 1. Install the solution from the Solutions Library

Go to the Solutions Library, search for solution "Retail Agentic Solution" and import it following the instructions provided in section Installing Solution Templates.

Wait until the import status shows as “Success”.

Step 2. Configure app connections

To configure the app connection, follow these steps:

  1. Go to Administration > Druid Services and confirm that Druid Service Gateway resources are provisioned for Becus 1.0 and GPT-4o.
  2. Note:  If the DRUID.LLM resource does not appear, contact your sales representative to activate these resources.
  3. Go to Solution Content > Apps . The following apps are included:
  4. App Description Provisioning
    Druid-SLM_Becus 1.0 Used for anonymization of PII. Provisioned by DRUID
    GPT-4o Used for external LLM processing of anonymized data Provisioned by DRUID
    Azure Blob Service Used for storing images attached to claims. Pre-configured, requires your Azure subscription details.

  5. Click on the Azure Blob Service app and enter your Azure subscription details: Account Name and Account Key.
  6. Click Save to complete the configuration.
  7. Click Publish to activate the apps.

Step 3. Enable the anonymization feature

The anonymization feature is disabled by default. To enable it, follow these steps:

  1. From the Workspace menu, select DataAnonymization.
  2. In the Data Anonymization view, click on the Current Value record. The Current Value form opens.
  3. From the Value field, select Enabled.
  4. Click the Save & close icon at the top-right corner of the page top save and exit the form.
Note:  This is the only step required to activate anonymization after apps are provisioned.

Step 4. Set up the bot special flows and enable KB usage

Go to the bot details page and configure the following special flows:

Special flow Value
Welcome flow

first-welcome-flow

Hint:  When a chat starts, this flow initializes the retail demo database.
Intent not found flow switch-intent
Knowledge Base response flow trigger-gpt-knowledgebase-agent

Tap on Use Knowledge Base to activate prediction in the Knowledge Base.

Save the bot configuration.

Step 5. Configure NLU Intents Classification with LLM

To configure NLU intents classification with LLM, follow these steps:

  1. Navigate to NLU > Configurations > Intents tab.
  2. Click on Thresholds and parameters.
  3. Add the NLU.NER.Classification.ModelType parameter and set it to LLM.
  4. Click the link that appears in the message below the NLP parameters. The NLU Intents Classification with LLM expands.

  5. From the Endpoint Type field, select Druid.
  6. From the Model Name field, select Druid/becus1.0.
  7. For both prompts, click the Set default button. The default DRUID prompts will be automatically filled in.
  8. Click Save at the bottom of the page to apply the NLU configuration.
  9. Train the bot.

Each new agent should have a description and some training phrases.

Each agent should have its own set of phrases so that anonymization and intent detection are modular and precise. This ensures the assistant routes user input correctly, even when anonymized.

Step 6. Prepare the standard answer Knowledge Base

Follow these steps to configure the Retail Standard KB for storing standard support responses:

  1. Navigate to NLU > Knowledge Base.
  2. Click the Add new button in the top-right corner of the page.
  3. Enter the data source Name exactly as: "Ticket Management Standard KB".
  4. Choose Structured Documents as the data source Type.
  5. Upload this sample Excel file or your own set of standard answers.
  6. Set the Min score threshold to 30.
  7. Set the Target match score to 60.
  8. Click Create to add the data source.
  9. Click on the newly create data source.
  10. Click Extract to start processing the data from the uploaded Excel template or your standard answers.
  11. Once the extraction is complete, click Train to finalize the training process.

The Knowledge Base is trained and ready with the standard answers for support tickets.

Step 7. Configure Abandoned Cart flow

To configure the Abandoned Cart Flow

  1. Go to bot details > Dialogue Management and from the Inactivity End Conversation flow, select create-draft-order.
  2. Set the Conversation Timeout (in minutes). This defines how long the bot waits after inactivity before triggering the abandoned cart flow.

At runtime, when the configured inactivity period is reached:

  • If the user still has the bot open and items in the cart:
    • The bot asks if the user wants to continue with the cart.
    • If the user selects Yes, no order is created.
    • If the user selects No, an order is created with Abandoned status for reporting.
  • If the user no longer has the bot open:
    • The bot automatically creates an order with the cart contents in Draft status.
    • When the user later logs in or searches for a product:
      • If they choose to keep the cart, the current cart is replaced by the draft order (and the draft is deleted).
      • If they choose not to keep it, the cart is cleared and the draft order is marked as Abandoned.

This ensures abandoned carts are properly tracked and reported, giving you actionable insights to recover potential lost sales.

Running the Solution

Start a conversation with the assistant. Examples:

  • “I’m in the mood for reading, what book do you recommend?”
  • “I want to search for a product and I have an image” (upload an image).
  • “What’s your return policy?” (answered from KB).
  • “I want to file a claim” (where the user has the option to add files)

The system will:

  • Anonymize and securely process PII through the Data Anonymization Workflow.
  • Retry requests automatically until a valid, consistent response is confirmed.
  • Store conversations safely with anonymized content in GPT entities.
  • Manage stock per shop, ensuring orders are tied to a location.
  • Handle claims with images stored securely in Azure Blob Service.

This ensures data privacy, reliable LLM handling, secure claim management, shop-aware workflows, and a seamless customer experience.